<template>
  <el-card class="view-height min-view-height">
    <el-tabs v-model="currentTabName" @tab-click="tabClick">
      <el-tab-pane
        v-for="item in panes"
        :key="item.key"
        :label="item.label"
        :name="item.key"
      >
      </el-tab-pane>
    </el-tabs>
    <el-row v-if="currentTabName === '1'" class="table-container">
      <abstract-table :height="tableMaxHeight" :data="tableData">
        <el-table-column
          align="center"
          label="打分人姓名"
          prop="number"
          show-overflow-tooltip
        />
        <el-table-column
          align="center"
          label="打分人电话"
          prop="name"
          show-overflow-tooltip
        />
        <el-table-column
          align="center"
          label="打分人科室"
          prop="tel"
          show-overflow-tooltip
        />
        <el-table-column
          align="center"
          label="季度"
          prop="email"
          show-overflow-tooltip
        />
        <el-table-column
          align="center"
          label="文件"
          prop="role"
          show-overflow-tooltip
        />
        <el-table-column
          align="center"
          label="添加时间"
          prop="addTime"
          show-overflow-tooltip
        />
      </abstract-table>
      <abstract-pagination
        :model="searchForm"
        @current-change="pageChange"
        @size-change="pageSizeChange"
      ></abstract-pagination>
    </el-row>
    <el-row v-if="currentTabName === '2'" class="table-container">
      <abstract-table :height="tableMaxHeight" :data="tableData">
        <el-table-column
          align="center"
          label="季度"
          prop="number"
          show-overflow-tooltip
        />
        <el-table-column
          align="center"
          label="姓名"
          prop="name"
          show-overflow-tooltip
        />
        <el-table-column
          align="center"
          label="上传时间"
          prop="tel"
          show-overflow-tooltip
        />
        <el-table-column
          align="center"
          label="得分"
          prop="email"
          show-overflow-tooltip
        />
        <el-table-column align="center" label="操作">
          <el-button type="text" size="small">已打分详情</el-button>
        </el-table-column>
      </abstract-table>
      <abstract-pagination
        :model="searchForm"
        @current-change="pageChange"
        @size-change="pageSizeChange"
      ></abstract-pagination>
    </el-row>
  </el-card>
</template>

<script>
import tablePageMixin from '@/mixin/tablePageMixin'
import autoAdaptHeightMixin from '@/views/_common/ListPage/autoAdaptHeightMixin'

export default {
  components: {},

  mixins: [tablePageMixin, autoAdaptHeightMixin],

  data: () => ({
    addDialog: false,
    searchForm: {
      page: 1,
      pageSize: 10,
      total: 0
    },
    currentTabName: '1',
    panes: [
      {
        label: '需打分的信息',
        key: '1'
      },
      {
        label: '已打分的信息',
        key: '2'
      }
    ]
  }),

  methods: {
    add() {
      this.addDialog = true
    },

    tabClick() {
      this.search()
    },

    search() {}
  }
}
</script>
